package com.ruoyi.finance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.finance.mapper.TFreightWayBillRelMapper;
import com.ruoyi.finance.domain.TFreightWayBillRel;
import com.ruoyi.finance.service.ITFreightWayBillRelService;

/**
 * 运费关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-16
 */
@Service
public class TFreightWayBillRelServiceImpl implements ITFreightWayBillRelService 
{
    @Autowired
    private TFreightWayBillRelMapper tFreightWayBillRelMapper;

    /**
     * 查询运费关联
     * 
     * @param freightBillId 运费关联主键
     * @return 运费关联
     */
    @Override
    public TFreightWayBillRel selectTFreightWayBillRelByFreightBillId(Long freightBillId)
    {
        return tFreightWayBillRelMapper.selectTFreightWayBillRelByFreightBillId(freightBillId);
    }

    /**
     * 查询运费关联列表
     * 
     * @param tFreightWayBillRel 运费关联
     * @return 运费关联
     */
    @Override
    public List<TFreightWayBillRel> selectTFreightWayBillRelList(TFreightWayBillRel tFreightWayBillRel)
    {
        return tFreightWayBillRelMapper.selectTFreightWayBillRelList(tFreightWayBillRel);
    }

    /**
     * 新增运费关联
     * 
     * @param tFreightWayBillRel 运费关联
     * @return 结果
     */
    @Override
    public int insertTFreightWayBillRel(TFreightWayBillRel tFreightWayBillRel)
    {
        return tFreightWayBillRelMapper.insertTFreightWayBillRel(tFreightWayBillRel);
    }

    /**
     * 修改运费关联
     * 
     * @param tFreightWayBillRel 运费关联
     * @return 结果
     */
    @Override
    public int updateTFreightWayBillRel(TFreightWayBillRel tFreightWayBillRel)
    {
        return tFreightWayBillRelMapper.updateTFreightWayBillRel(tFreightWayBillRel);
    }

    /**
     * 批量删除运费关联
     * 
     * @param freightBillIds 需要删除的运费关联主键
     * @return 结果
     */
    @Override
    public int deleteTFreightWayBillRelByFreightBillIds(Long[] freightBillIds)
    {
        return tFreightWayBillRelMapper.deleteTFreightWayBillRelByFreightBillIds(freightBillIds);
    }

    /**
     * 删除运费关联信息
     * 
     * @param freightBillId 运费关联主键
     * @return 结果
     */
    @Override
    public int deleteTFreightWayBillRelByFreightBillId(Long freightBillId)
    {
        return tFreightWayBillRelMapper.deleteTFreightWayBillRelByFreightBillId(freightBillId);
    }

    /**
     * 新增运费关联
     *
     * @param freightBillId 账单ID
     * @param wayBillIds 运单ID列表
     * @return 结果
     */
    @Override
    public int insertTFreightWayBillRelExt(Long freightBillId, List<Long> wayBillIds)
    {
        return tFreightWayBillRelMapper.insertTFreightWayBillRelExt(freightBillId, wayBillIds);
    }
}
